package com.jwl.idc.http;

import android.content.Context;

import com.jwl.idc.actionbean.BaseBean;

/**
 * Created by liangfan on 2015/12/31.
 */
public class HttpActionBase implements HttpActionInterface{

    public Context mContext;
    private HttpToViewInterface viewInterface = null;

    public HttpActionBase(Context context, HttpToViewInterface face) {
        this.mContext = context;
        this.viewInterface = face;
    }

    @Override
    public void excuteFinish() {
        viewInterface.finish();
    }

    @Override
    public void onSuccess(BaseBean data) {
        viewInterface.callBackData(data);
    }

    @Override
    public void onFialure(BaseBean data) {
        //将结果在界面中打印出来
    }

    @Override
    public void onTokenInvalid() {
        //通知，用户已经失效，返回到登录界面
    }
}
